<template>
  <div v-show="show" class="babyDialog">
    <div class="mask">
      <i class="el-icon-close close" @click="close"></i>
      <slot></slot>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    show: [Boolean]
  },
  methods: {
    close() {
      this.$emit('update:show', false);
    }
  }
};
</script>
<style lang="scss" scoped>
.mask {
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  right: 0;
  z-index: 666;
  width: calc(100vw - 192px);
  height: 100vh;
  top: 0;
  background-color: rgba(0, 0, 0, 0.7);
  box-sizing: border-box;
  .close {
    position: absolute;
    right: 20px;
    top: 76px;
    cursor: pointer;
    color: #4b90ff;
    font-size: 28px;
    font-weight: bold;
  }
}
</style>
